package org.chen.service_enum;

public enum ErrorCode {
    SUCCESS(200, "Success"),
    BAD_REQUEST(400, "Bad Request"),
    UNAUTHORIZED(401, "Unauthorized"),
    FORBIDDEN(403, "Forbidden"),
    NOT_FOUND(404, "Not Found"),
    INTERNAL_SERVER_ERROR(500, "Internal Server Error"),
    CUSTOM_ERROR(1001, "Custom Error Message"),
    EXIST(1002,"EXIST"),
    DELETE_USER(1003,"Delete User Failed"),
    EXITS(1004,"Exits"),
    UPDATE_FAILED(1005,"Update Failed"),
    OLD_PASSWORD_FAILED(1006,"Old Password Failed"),
    USER_QUERY_NOT_FOUND(1008,"USER_QUERY_NOT_FOUND"),
    CHAT_HISTORY_NOT_FOUND(1009,"CHAT_HISTORY_NOT_FOUND"),
    SAVE_FAILED(1010,"Save Failed"),
    NOT_EXIST(1007,"Not Exist");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
